package com.ruoyi.web.controller.weiriya;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.weiriya.domain.WSocketTwo;
import com.ruoyi.weiriya.service.IWMemberChargeRecordService;
import com.ruoyi.weiriya.service.IWSocketTwoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 插座信息Controller
 * 
 * @author ruoyi
 * @date 2023-08-16
 */
@RestController
@RequestMapping("/weiriya/receive")
public class WSocketReceiveController extends BaseController
{
    @Autowired
    private IWSocketTwoService wSocketTwoService;

    @Autowired
    private IWMemberChargeRecordService memberChargeRecordService;

    /**
     * 插座心跳上报
     */
    @PostMapping("/common")
    public void common(@RequestBody JSONObject object)
    {
        wSocketTwoService.common(object);
    }

    /**
     * 汤姆达推送
     */
    @PostMapping("/tom/common")
    public Map tomCommon(@RequestBody JSONObject object)
    {
        return memberChargeRecordService.tomCommon(object);
    }

}
